//
//  UIBarButtonItem+Extension.swift
//  AdaoWeibo
//
//  Created by 孙道慧 on 2017/4/1.
//  Copyright © 2017年 maihaoche. All rights reserved.
//

import UIKit

extension UIBarButtonItem {
    convenience init(title:String,fontSize:CGFloat = 16,target:AnyObject?, action:Selector) {
        let leftBtn : UIButton = UIButton.cz_textButton(title, fontSize: fontSize, normalColor: UIColor.darkGray, highlightedColor: UIColor.orange)
        leftBtn.addTarget(target, action: action, for: .touchUpInside)
        // 实例化UIBarButtonItem
        self.init(customView:leftBtn)
    }
}
